home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Misc / UAE / docs / README.AMIGA < prev    next >
Encoding:
Text File  |  1998-02-12  |  32.6 KB  |  801 lines

  1.                               UAE-0.7.0
  2.                             AMIGA version
  3.                                    
  4.                           by Samuel Devulder
  5.                       (devulder@info.unicaen.fr)
  6.  
  7.                               feb. 1997
  8.                                    
  9.  
  10.                        CONTENT
  11.                                =======
  12.              1. INTRODUCTION
  13.              2. REQUIREMENTS
  14.              3. QUICKSTART
  15.              4. COMMAND LINE ARGUMENTS
  16.                a. Window size
  17.                b. Screen type
  18.                c. Render style
  19.                d. Memory settings
  20.                e. Floppy emulation
  21.                f. Volume mounting
  22.              5. RUNTIME HOTKEYS
  23.                a. Reset UAE
  24.                b. Enter in debug-mode
  25.                c. Quitting UAE
  26.                d. Enable/Disable display
  27.                e. Ejecting and inserting virtual floppies
  28.              6. FAQ
  29.              7. HOW TO SPEED UP UAE?
  30.              8. AREXX PORT
  31.              9. HOW TO (RE-)BUILD UAE
  32.             10. COMPILING UAE WITH SAS/C
  33.             11. REMARKS OR BUG-REPORTS
  34.             12. LAST NOTE
  35.  
  36.  
  37.  
  38.  
  39. 1. INTRODUCTION
  40. ===============
  41.  
  42. This the Amiga port of UAE v0.7.0. UAE is the Un*x Amiga Emulator
  43. written by Bernd Schmidt. 
  44.  
  45. This port is build with the help of ADE (Amiga Development Enviroment):
  46. GCC, ixemul, ... Thus allowing an easy port of the original unix version to
  47. the Amiga without a lot of modifications. 
  48.  
  49. For extra information (specially, the unix-like command line options), you
  50. should read the README file.
  51.  
  52.  
  53. 2. REQUIREMENTS
  54. ===============
  55.  
  56. This version will work on any Amiga running at least AmigaOS v2.04 and is
  57. programmed to use AmigaOS v3.0 facilities when available. You'll need
  58. ixemul installed because it was compiled with gcc. To allow the GUI to
  59. work, MUIRexx (and MUI) must be installed too. Without MUIRexx, UAE will
  60. stick to CLI and unix-style operations.. this is quite boring :)   
  61.  
  62. UAE needs roughly 8Mb of ram to run on the Amiga (of course, this depends
  63. on UAE memory settings). A fast processor is also strongly recommended. 
  64.  
  65. Note: if you are short in ram, that you can use UAE under VMM (virtual
  66. memory program by Martin Apel). If you dare, you can also run UAE under
  67. UAE! 
  68.  
  69.  
  70. 3. QUICKSTART
  71. =============
  72. UAE is originaly a unix world program. That means it has cryptic option and
  73. command line arguments. Hopefully, I've managed to make this a bit more
  74. amiga-user friendly. Roughtly, UAE can be seen as organised in layers: On
  75. top you find the GUI (graphical user interface): UAEWB; below, there is the
  76. CLI-to-unix command-line translator: "UAEWB CLI"; and the last layer is the
  77. "UAE" executable which can only understand unix-like parameters. 
  78.  
  79.                    [UAEWB]    <==>  MUIRexx GUI
  80.                 |                 |
  81.                 V                 V
  82.                [UAEWB CLI]  <==>     CLI
  83.                 |                 |
  84.                 V                 V
  85.               [UAE]     <==>     Unix
  86.  
  87. Each layer transforms and directs its arguments to the layer immediately
  88. below until the last unix level. You can run UAE from every layer; so that
  89. means there is at least three ways to start UAE: You can either use the
  90. workbench, or a CLI/Shell with the standard amiga template or in a
  91. cli/shell with a unix-like (read cryptic) command-line. 
  92.  
  93. To quickly try UAE, you should use the workbench. That requires MUIRexx to
  94. be installed (v3.0 is prefered). Provided MUIRexx is properly installed,
  95. you can simply click on the UAEWB icon. The GUI-launcher will pop-up, then
  96. you can modify the settings and press on the "USE" button. If you stop the
  97. mouse pointer on a gadget, an help-bubble will tell you about the meaning
  98. of the gagdet. 
  99.  
  100. To start UAE from the cli, you can simply enter "UAEWB CLI". You can also
  101. add various arguments (see below) to modify the default setup.
  102.  
  103. Last way: the unix-fashion. This one is reserved for advanced users or
  104. users that already know uae on a unix-like plateform. In that mode, UAE
  105. accepts argument of the original linux-uae with some minor differences. If
  106. you have a bootable disk, put it in DF0: and type this in a shell/cli:  
  107.     UAE -H2 -S2 -c2 -s2 -f2 -O320:256:XYl -0/dev/df0
  108. Then you should see a screen-mode requester. Select the HAM6 (pal:320x256)
  109. mode to see the demo run in a HAM screen.
  110.  
  111. Once UAE is running, you should see the runtime GUI appear on the
  112. workbench. Help-Bubbles will tell you how the GUI works.. The QUIT button
  113. closes everything.
  114.  
  115.  
  116. 4. COMMAND LINE ARGUMENTS
  117. =========================
  118.  
  119. a. Window size 
  120. --------------
  121. This is the size of the display UAE will use. This is the first parameter
  122. you need to enter. Normally, a window size of 320x256 or 320x240 (ie. 
  123. pal-lores output is emulated) or 640x512/640x480 (ie. pal/hires output is
  124. emulated) should be enough (recall UAE only emulates an A500 where only PAL
  125. screens are available).
  126.  
  127. This option is selected with the folling command lines:
  128.  
  129.     unix-style: -O<width>:<height>:XY<ld>
  130.     <width>  can be 320 or 640. If it is 320, then <ld> must be 'l'.
  131.         <height> can be 256 (or 240) or 512 (or 480). If it is 512, <ld>
  132.                  must be set to 'd'.  
  133.  
  134.     amiga-style: LORES/S,HIRES/S
  135.     LORES makes uae use a 320x256-like window
  136.     HIRES makes uae use a 640x512-like window
  137.  
  138.     GUI-style: select LORES or HIRES.
  139.  
  140. Other resolution are of course possible, but you should know what you are
  141. doing to use them. 
  142.  
  143. b. Screen type
  144. --------------
  145. This is the second parameter you should enter. This option tells UAE what
  146. kind of output it must use. It can be a public screen or a customscreen. If
  147. the customscreen is used, it is declared as public with "UAE" as a
  148. name. You can then, using MUI, redirect the GUI on UAE screen (but I think
  149. it not a good idea :) 
  150.  
  151.     unix-style: -H n  
  152.     n=0 => Makes UAE automagically select the best PASL screen to
  153.            display the desired size. 
  154.     n=1 => Tells UAE to use the workbench screen.
  155.     n=2 => UAE will pop-up and asl-screen selector in which you can
  156.                select the mode you prefer. Please note that you will
  157.                probably have to correct the screen-size because ASL tends
  158.                to modify the initial setting of the -O option (I know, this
  159.                is strange :) 
  160.     n=3 => this mode is supposed to give a Graffiti screen, but I think
  161.                it is somehow broken (graffiti users can use picasso96 I was
  162.            told anyway :-) 
  163.  
  164.      amiga-style: DEFSCR/S,PUBSCR/S,REQSCR/S,SM/K,DEPTH/K
  165.         DEFSCR => same as -H0 above.
  166.         PUBSCR => same as -H1 above.
  167.         REQSCR => same as -H2 above.
  168.     
  169.     SM/K and DEPTH/K are working together. You use them to tell UAE to
  170.     use a special screen-mode (SM=<ModeID>) at a specific depth
  171.     (DEPTH=<depth>) without using the mouse. For example, to use an
  172.     HAM6 output, you can do:   
  173.              UAEWB CLI LORES SM=0x21800 DEPTH=6
  174.  
  175. Note that, HAM6 is the only ham-mode supported. HAM8 is not usefull for UAE
  176. because the ECS can't display more than 4096 colors simultaneously.
  177.          
  178. c. Render style
  179. ---------------
  180. UAE can render a dithered output and/or a gray output. 
  181.  
  182. The dithered ouput is usefull when not enough colors are available
  183. (typically less than 256), but it takes some cpu power and reduces the
  184. output readibily. By default, uae always dithers, but you can disable this
  185. with the following options: 
  186.  
  187.     unix-style:  -x
  188.  
  189.     amiga-style: NODITHER/S
  190.  
  191.     GUI-style:   click on the DITHER check box.
  192.  
  193. The gray output is usefull when not enough colors are available, it also
  194. reduces the chipram requirement and thus increase the speed of the display
  195. (16colors + ditherings is pretty good and fast): 
  196.  
  197.     unix-style:  -T
  198.  
  199.     amiga-style: GRAY/S
  200.  
  201.     GUI-style:   select the GRAY checkmark.
  202.  
  203. d. Memory settings
  204. ------------------
  205. UAE can emulate different kinds of memory settings. You can have from 512kb
  206. up to 8Mb of chipram, you can also have fastmemory at $200000 or
  207. pseudo-fast memory at $C00000. If UAE is emulating a 68020+ cpu, then you
  208. can even have Zorro-III ram (up to 64Mb of Z-III ram):
  209.  
  210.     unix-style: -c<n>, -s<n>, -F<n>, -U<n>
  211.     see original README or use "UAE -h".
  212.  
  213.     amiga-style: CHIP/K,SLOWFAST/K,Z2RAM/K,Z3RAM/K
  214.     memory is mesured in Kb but a few inputs are aceptables:
  215.     - CHIP can be 256 or 512 or 1024 or 2048.
  216.         - SLOWFAST is the memory at $C00000 and 512 or 1024 are the two
  217.           availables choice.  
  218.     - Z2RAM is the memory at $200000 and it can grow from 1024 (1Mb)
  219.       to 8192 (8Mb) by steps of 1024 (1Mb).
  220.     - Z3RAM is the zorro 3 memory and it starts from 1024 to 65536 by
  221.       steps of 1024 (1Mb).
  222.  
  223.     GUI-style: Should be self-explicit. Use the help-bubbles in case of
  224.         trouble.     
  225.  
  226. e. Floppy emulation
  227. -------------------
  228. You can emulate up to 4 floppy disks with UAE using adf files (amiga disk
  229. file). Here is the command line way to define them:
  230.  
  231.     unix-style: -0<name1>, -1<name2>, -2<name3>, -3<name4>
  232.  
  233.     amiga-style: DF0/K, DF1/K, DF2/K, DF3/K. 
  234.     simply use DFn=<name>.
  235.  
  236.     GUI-style: 
  237.     enter <name> in the DFx: asl file-requester.
  238.  
  239. There is a special magic in UAE in that you can use your native floppy
  240. system for UAE. To do do, you must use a <name> with a special format. That
  241. format is DEV:<device-name>[.device]/unit or DEV:DF<num> (uppercase or
  242. lowercase doesn't matter) with the amiga or GUI style. With the unix-style,
  243. you can use the unix-style path: /dev/<device-name>[.device]/unit or
  244. /dev/df<num>. You can even see those magic DEV: file in UAE file-requester
  245. under the DEV: assign. For example, to make UAE use the current disk you
  246. have in df1, just use the dev:df1 name.. 
  247.  
  248. Note: the DEV: assign that UAE creates can interfere if you have a real
  249. DEV: handler installed. UAE will output a warning if he sees that DEV: is
  250. already used. In that case you wont be able to see the DEV: assign in the
  251. file requester but you can still use the DEV:name magic in UAE (the DEV:
  252. handler and UAE magic are compatible :)
  253.  
  254. f. Volume mounting
  255. ------------------
  256. You can mount Amiga partition under UAE. This is usefull if you want to see
  257. your own workbench running under UAE in a workbench window. Please not that
  258. this is an advanced option and you should refer to the original README to
  259. see how to properly use that feature, but here is how it can be used on the
  260. amiga: 
  261.  
  262.     unix-style: -m<uaename>:<amiga path>
  263.     You can use that paramater up to 20 times. <Amiga path> can be a
  264.     natural amiga-path like sys:t/ or a unix-style path like /sys/t/. 
  265.  
  266.     amiga-style: MOUNT/K
  267.      You can only mount one single volume. The syntax is
  268.         MOUNT=<uaename>:<amiga path>
  269.  
  270.     GUI-style: 
  271.     You can enter up to 2 volumes with the GUI using the "Volume 1:"
  272.     and "Volume 2:" string gadget in the "Disk setup" panel. Other
  273.     volumes must be entered using the "extra:" string gadget on the
  274.     misc panel. The "extra" parameters in the GUI are transmitted
  275.     directy to the unix executable, so you must use the "-m" or "-M"
  276.     scheme (see README). 
  277.           
  278.     
  279. 5. RUNTIME HOTKEYS
  280. ==================
  281. When UAE is running, you can make the emulator some specific actions
  282. (reset, change a virtual floppy, ...) by pressing certain keys. Here is
  283. a listing:
  284.  
  285. a. Reset UAE
  286. ------------
  287. You can reset the emulator by pressing CTRL-ALT-DEL in UAE's window. I
  288. guess it reminds you about something :^) [*] You can altenatively press on 
  289. the "RESET" button in the GUI.
  290.  
  291. b. Enter in debug-mode
  292. ----------------------
  293. You can enter debug mode by pressing ^C or ^D in the cli/shell window or by
  294. pressing the close-gadget of UAE's window when used on a public screen. You
  295. can also send a break signal to UAE task using c:break or other tools like
  296. that. Last solution: press on the "debug" button on the GUI.
  297.  
  298. c. Quitting UAE
  299. ---------------
  300. To quit UAE, you have to enter in debug-mode (see above) and press 'q'. You
  301. can also send the QUIT command to the AREXX port name UAE (see below). 
  302.  
  303. d. Enable/Disable display
  304. -------------------------
  305. You can toggle on/off the screen rendering to speed up the sound processing
  306. by pressing CTRL-SHIFT-ALT-F9 or using the "display: off" cycle gagdet in
  307. the GUI. 
  308.  
  309. e. Ejecting and inserting virtual floppies
  310. ------------------------------------------
  311. You can insert disks by pressing CTRL-LALT-F1, CTRL-LALT-F2, CTRL-LALT-F3, or
  312. CTRL-LALT-F4 in UAE window. F1 corresponds to drive DF0, F2 to DF1, and so on.
  313. Alternatively you can simply eject a disk by pressing LSHIFT in addition of
  314. the above keys. On the GUI, there is an "Eject" button to eject disks, and
  315. you can enter the name of the file uae can use as a disk in the string
  316. gadget to the right of the "Eject" button.
  317.  
  318. _____
  319. [*] That's the way to Reset an IBM-PC clone :)
  320.  
  321.  
  322. 6. FAQ
  323. ======
  324.  
  325. Q. Can I use my joystick?
  326.  
  327. A. Yes, just try it :)
  328.  
  329.  
  330. Q. Can I use .dms files instead of .adf?
  331.  
  332. A. Yes, grab undms.c.Z by David Tritscher from aminet (misc/unix). Compile 
  333. it using any C compiler (DICE by Matt Dillon for example). Put the 
  334. executable someware in your path (c: for example), and UAE will be able to 
  335. use dms files.
  336.  
  337.  
  338. Q. The README file tells about a necessary kick.rom file, but I've noticed it
  339. is not needed by the amiga port, why ?
  340.  
  341. A. If UAE does not find a rom-file, it'll use the ROM located at address
  342. $F80000 - $FFFFFF. Thus, you need not grab it and that will spare you
  343. some disk space. You can disable this feature by creating the
  344. environment variable "USE_UAE_ERSATZ", in which case UAE will try to
  345. emulate rom calls using a built'in pseudo kickstart.
  346.  
  347.  
  348. Q. Can I use cybergraphics or picasso96?
  349.  
  350. A. Yes, using the -H2 option, you can select a cybergfx/picasso96 mode. Be
  351. sure to select a proper window size for UAE. If you are using a
  352. cybergfx/picasso96 workbench, UAE will use all the available bitdepth. That is
  353. to say that if your workbench is 16bbp, UAE will run trucolor without
  354. dithering. (Note: 8bit mode does not seems to work.. Use truecolor modes
  355. instead).
  356.  
  357.  
  358. Q. Can I make a movie with UAE?
  359.  
  360. A. Yes you can. First you must use a native amiga screenmode (because my
  361. iff-grab routine pokes in the chipram :(). Second, you need to define
  362. ENV:UAEIFF to a proper filename. Then, UAE will save an IFF file at every
  363. frame. For example if you: "setenv UAEIFF t:uae.%04d", UAE will create
  364. t:uae.0000, t:uae.0001, t:uae.0002, ... If you forget the %d format specifier,
  365. uae will add ".%05d" by default to the format. You can then collect all those
  366. iff files into a single anim file using an appropriate program (Rend24 by
  367. Thomas Krehbiel for example). 
  368.  
  369.  
  370. Q. There is no sound, even with the -S2 setting!
  371.  
  372. A. The sound may not work, depending on the internal setup used during the
  373. compilation for the current executable.
  374.  
  375.  
  376. Q. Can I use AHI?
  377.  
  378. A. Yes. Mount the AUDIO: device provided with the AHI package.
  379.  
  380.  
  381. Q. Why is the sound so ugly?
  382.  
  383. A. The sound can be emulated in this version. But Amigas are too slow for it
  384. to be really usefull. On my amiga, UAE produces one second of sound every
  385. twenty seconds in Sanity's Interference demo. Thus, An amiga which is around
  386. 20 times faster as an A4000 would be nice. PowerPC Amiga will probably achieve
  387. this one day. 
  388.  
  389.  
  390. Q. Can I grab the sound with UAE?
  391.  
  392. A. Yes you can. If you setenv AUDIONAME <format>, then uae will put the
  393. sound-samples into a file using the <format> specifier. The <format> 
  394. specifier looks like a filename with optionally two "%d". If present, the
  395. first "%d" will be replaced by the frequency (see the -R flag for UAE) and the
  396. second one will be replaced by the buffer size (-B option for UAE). This
  397. is usefull if you want to use the AUD: driver Martin Brenner. Alternatively,
  398. you can enter the <format> in the GUILauncher.
  399.  
  400.  
  401. Q. What is the "Appwindow started" message that UAE tells me while booting? 
  402.  
  403. A. With UAE on the amiga, you can run one of you executable within the
  404. emulator. To do so, you must mount your system partition (-m sys:sys:) as
  405. well as other partition you'd like to use (in other word, make UAE boot on
  406. a clone of your workbench). Then, run the "amiga/uae_cli" executable inside
  407. UAE. Once this is done, click on a Workbench icon on your real workbench
  408. and drop it onto UAE's window.. Then *MAGIC*, you'll see the executable
  409. start in UAE! Alternatively, you can send "uaeexe <command-line>" to the
  410. ARexx port of UAE and it will execute <command-line> in an emulated cli
  411. environment. 
  412.  
  413.  
  414. Q. Can UAE be a bit faster using some ASM magic?
  415.  
  416. A. There is already some ASM magic: the CPU emulation is speed up by using
  417. ASM code to compute flags directly from the 680x0 SR/CCR register.  
  418.  
  419.  
  420. Q. Is there any special setting to make it run a bit faster?
  421.  
  422. A. Seen next section :)
  423.  
  424.  
  425. 7. HOW TO SPEED UP UAE?
  426. =======================
  427. Here are a few tips to make UAE run faster. Those are for the unix-style of
  428. command line, but you should be able to interpret them with the GUI or the 
  429. amiga-style. 
  430.  
  431. First you need to know that chunky2planar conversion takes time. In order 
  432. to decrease that time, I encourage you to install NewWPA8 on your system. 
  433. NewWPA8 can be found in Aminet. You can also gain speed by reducing the 
  434. screen depth. Of course uae running on a 3bitplanes screen is ugly, but 
  435. you can increase the output quality by using a grayscale output (-T
  436. option). 
  437.  
  438. You can gain speed by reducing UAE screen/window size. By default, you can 
  439. use a 320x256 customscreen mode, but a better solution is to make uae run 
  440. on a 640x256 workbench screen and use a 320x128 window. That way, uae will
  441. skip one line out of two speeding things up a bit. To achieve this you can 
  442. launch UAE with the following commandline:
  443.  
  444.             CLI> UAE -H1 -O320:128:XYlc
  445.  
  446. You can also skip one frame out of two with the -f2 option, but this
  447. reduces the smoothness of the display. An other option to gain speed is 
  448. to make UAE emulate a 32bit blitter that terminates his operations
  449. immediately. This is done with the -n3i option. 
  450.  
  451. An other option is to attribute more CPU power to the customchip
  452. emulation. The parameter -w<num> permits this. The more <num> is, the more
  453. time UAE spend in the customchip emulation. Some demos ore games are very
  454. customchip intensive, but although uae default setup is good for most
  455. situation, it may be interresting to increase the <num> parameter. The
  456. default value is 4, but some demos require 8 or 10 to permit all the
  457. customchip operation to perform better (Enigma demo for example). The
  458. problem is that with a big <num> value, UAE will have very few time to
  459. emulate the CPU. The problem is that the CPU has to respond quickly to
  460. interrupts, and a high value of <num> will prevent it to respond fast
  461. enough leading to a crash or a dead lock. (Remind that even a real amiga
  462. with hires and disk-dma and sound-DMA on can have trouble to multitasks
  463. (cf. Octamed documentation)). So the thing is with the -w<num> parameter to
  464. find the proper value of <num> to have a fast customchip but still enough
  465. time for the cpu emulation. The option -w8 can increase the speed of some
  466. demos while it slows down some other demos. This is dependant of the
  467. program so that no general rule is available.  
  468.  
  469. The ultimate option to make UAE run faster is to ... (surprise, surprise!)
  470. buy a faster CPU... If only the 68060 running a 350Mhz was available :-)
  471. I know is not really an option, so to sum the things up, to run UAE fast, 
  472. you had rather have a fast CPU (68060 at 50Mhz), a 640x256 (16 colors) 
  473. workbench with NewWPA8 installed, and run UAE with
  474.  
  475.                CLI> UAE -H1 -O320:128:XYlc -f2 -n3i -w8
  476.  
  477. I hope all those tips will help you.
  478.  
  479.  
  480. 8. AREXX PORT
  481. =============
  482. This section is rather for experienced user or programmers that want to
  483. enhance UAE or to replace MUIRexx GUI.
  484.  
  485. UAE provides an AREXX port through which you can set or retrieve
  486. internal parameters or variables such as the state of the joystick
  487. emulation or the framerate and so on. Is also implements a "feedback"
  488. mecanism so that a GUI piloting UAE through the AREXX port can hear
  489. about dynamical modification of UAE variables such as led states and
  490. the like. The port name is "UAE". If that port already exists, UAE
  491. will disable it's AREXX feature (that is to say if you have 2 copies
  492. of UAE running on your system, only one will have an AREXX port. I
  493. doubt anyone will try to run 2 UAE in the same time :-).
  494.  
  495. The commands that need a string argument accepts quoted strings. If
  496. the string is not quoted then it is the following word that will be
  497. used. The quotes can be single (') or double ("). They must match (eg.
  498. if you begin with ('),then you must end your string with (') too).
  499. Within a string, you can use a backslash (\) to express escape
  500. sequences. For example, "This 'is' a \"string\"." represents the
  501. string (This 'is' a "string"). I hope you get it :-)
  502.  
  503. Here is a list of the available commands:
  504.  
  505.         * BYE
  506.         * QUIT
  507.                 This make the emulator exit.
  508.  
  509.         * RESET
  510.                 This makes a hard-reset of the emulator.
  511.  
  512.         * DEBUG
  513.                 This forces the emulator to enter in debugging mode.
  514.  
  515.         * EJECT <num>
  516.                 This will eject the disk in drive <num> (from 0 to 3).
  517.  
  518.         * INSERT <num> <filename>
  519.                 This will insert the filedisk <filename> in drive unit
  520.                 <num>. 
  521.  
  522.         * FRAMERATE <num>
  523.                 This sets the framerate to <num> (1 <= <num> <= 20).
  524.                 It is a way to overwrite the -f flag of UAE.
  525.  
  526.         * VERSION <arg>         (<arg> = NUM | AUTHOR | PORT | STRING)
  527.                 This places in the AREXX 'RESULT' variable some
  528.                 information about UAE's version. 
  529.  
  530.                 NUM returns a numerical value that is to be interpreted
  531.                 as UAEMAJOR*100 + UAEMINOR*10 + UAEURSAMINOR (ie. uae
  532.                 v0.6.4 will return "64").
  533.  
  534.                 AUTHOR returns the original author of UAE (ie. Bernd
  535.                 Schmidt). 
  536.  
  537.                 PORT returns the name of the port author (that's me!:-)
  538.                 
  539.                 STRINGS returns a summary string made with the above
  540.                 strings. 
  541.  
  542.         * DISPLAY <arg>         (<arg> = ON | OFF | TOGGLE)
  543.                 This will enable or disable the display rendering.
  544.  
  545.         * FAKEJOYSTICK <arg>    (<arg> = ON | OFF | TOGGLE)
  546.                 This will enable or disable the joystick emulation. It
  547.                 is a way to overwrite the -J flag from the command
  548.                 line. 
  549.  
  550.         * SOUND <arg>           (<arg> = ON | OFF | BEST)
  551.                 This sets the state of the sound emulation (see option
  552.                 '-S' on the command line). BEST is the same as using
  553.                 the -S3 switch on the commandline.
  554.  
  555.         * QUERY <var>
  556.                 This asks UAE's for its internal variables. That
  557.                 state is written in the arexx 'RESULT' variable. So
  558.                 don't forget to put 'OPTIONS RESULTS' in your arexx
  559.                 scripts. 
  560.  
  561.                 <var> can be one of the following:
  562.  
  563.                 * FAKEJOYSTICK => returns "1" if the joystick
  564.                   emulation is ON and "0" if it is OFF.
  565.  
  566.                 * DISPLAY => returns "1" if the display is not
  567.                   inhibited and "0" otherwise.
  568.  
  569.                 * FRAMERATE => returns the current framerate (see
  570.                   option -f).
  571.  
  572.                 * SOUND => returns "0" if the sound is not emulated
  573.                   (ie. uae -S0 was used). "1" is returned when the
  574.                   sound is OFF (think about uae -S1). "2" means the
  575.                   sound emulation is ON and "3" means it is the best
  576.                   sound-emulation that is used (uae -S3).
  577.  
  578.                 * NAME_DF0
  579.                 * NAME_DF1
  580.                 * NAME_DF2
  581.                 * NAME_DF3 => returns the name of the diskfile used in
  582.                   the indicated unit.
  583.                   
  584.                 * LED_DF0
  585.                 * LED_DF1
  586.                 * LED_DF2
  587.                 * LED_DF3 => returns "1" if the drive led is hilighted
  588.                   and "0" if the led is OFF.
  589.  
  590.                 * LED_POW => returns "1" if the powerled is ON and "0"
  591.                   otherwise. 
  592.  
  593.         * UAEEXE [run] <executable> <args>
  594.                 This will make UAE lauch the <executable> provided 
  595.                 you've previouly starded uae_rcli. If <executable> is 
  596.                 "QUIT", then the "uae_rcli" process will exit(). Note 
  597.         that you must use "run" in order to launch the 
  598.         executable as an asynchronous command.
  599.  
  600.         * FEEDBACK <eventname> PORT|ADDRESS <portname>
  601.                                CMD_ON|CMD|CMD_OFF <cmd> 
  602.                 That command needs a special explanation:
  603.  
  604.                 <eventname> is the name of an internal UAE event. It
  605.                 can be any of:
  606.                    ON_EXIT (UAE is about to quit),
  607.                    LED_POW (the power led has changed),
  608.                    LED_DF0 (led of drive DF0 has changed),
  609.                    LED_DF1 (the same, but for DF1),
  610.                    LED_DF2 (well...),
  611.                    LED_DF3 (guess!),
  612.                    NAME_DF0 (name of filedisk df0 has changed),
  613.                    NAME_DF1 (obvious),
  614.                    NAME_DF2 (ditto),
  615.                    NAME_DF3 (...).
  616.  
  617.                 <portname> is the name of an AREXX port. It can be
  618.                 "COMMAND" in which case <cmd> is interpreted as DOS
  619.                 command. 
  620.  
  621.                 <cmd> is a string containing a command that UAE will
  622.                 send to <portname> when the event matching <eventname>
  623.                 occur.  
  624.  
  625.                 Each event has 2 available <cmd>s. One is set by the
  626.                 CMD_ON keyword, the other by CMD_OFF. CMD_ON can be
  627.                 abreviated to CMD.
  628.  
  629.                 When the event is the name of a led (LED_POW, LED_DF0,
  630.                 ...), it is the <cmd> associated to CMD_ON that will be
  631.                 sent to <portname> if the led is hilighted. It is the
  632.                 <cmd> of the CMD_OFF argument that will be used if the
  633.                 led is dimmed. I think you need an example to make it
  634.                 clear (no pun intended :)
  635.  
  636.                 If you issue the command:
  637.  
  638.                         address UAE feedback LED_POW PORT COMMAND
  639.                         CMD_ON "list t:" CMD_OFF "list s:" 
  640.  
  641.                 Then UAE will issue "list t:" when the led is set to ON
  642.                 and "list s:" when it set to OFF. Note: this feature
  643.                 was not initially meant to transform UAE as a dir-like
  644.                 programm :-) A more serious example can be found in
  645.                 UAEGUI.rexx where you'll find something like:
  646.  
  647.                         address UAE feedback LED_DF0 PORT UAEGUI,
  648.                          CMD_ON  "switch ID DF0 ATTRS 0x8042654b 1",
  649.                          CMD_OFF "switch ID DF0 ATTRS 0x8042654b 0"
  650.  
  651.                 That makes the gui led follow any state changements.
  652.  
  653.                 If <eventname> is not a name of a led (ON_EXIT,
  654.                 NAME_DF0, ...) then UAE will only use the CMD_ON
  655.                 command. For events like NAME_DF0, <cmd> can bear a
  656.                 '%s'. It'll be replaced by the name of the
  657.                 correponding filedisk. For example, the following code:
  658.  
  659.                         address UAE feedback NAME_DF0 PORT UAEGUI,
  660.                          CMD "popasl ID NDF0 CONTENT %s"
  661.  
  662.                 Will change the content of the popasl gadged whose ID
  663.                 is NDF0 automatically when the drivename is modified.
  664.  
  665.                 The event ON_EXIT is used when uae is about to exit.
  666.                 You can use it to automatically close an external GUI
  667.                 when UAE ends:
  668.                 
  669.                         address UAE feedback ON_EXIT PORT UAEGUI,
  670.                          CMD "quit"
  671.                         /* sends "quit" to UAEGUI when UAE exits */
  672.  
  673. Note: I hope my explanation about the ARexx port is not too fuzzy.
  674. You can always have a look to UAEGUI.rexx to figure out how to use
  675. it. The script UAEGUI.rexx needs MUIRexx v2.2 by Russ Leighton
  676. <russ@sneezy.lancaster.ca.us>. MUIRexx can be found on Aminet and
  677. allows quick programming of GUIs with MUI and ARexx.
  678.  
  679.  
  680. 9. HOW TO (RE-)BUILD UAE
  681. ========================
  682. This section is rather for programmers that want to build their own
  683. versions of UAE. You should be familiar with unix word if you intend to do
  684. so. If you want to compile UAE with SAS/C, you must read the next section.
  685.  
  686. If you wish to (re-)build uae, you need to have GeekGadget (short: GG) and
  687. gcc correctly installed (see ftp://ftp.ninemoons.com/pub/gg/). Not all part
  688. of GG are needed, but be sure to have gcc2.7.2.1, binutils, autoconf, awk,
  689. etc.
  690.  
  691. The default Makefile provided is for a MC68030 microprocessor. If you
  692. wish to have a Makefile tuned for your CPU (and fpu), just type "sh -c
  693. configure". 
  694.  
  695. If you have deleted the file "configure", you can rebuild it from
  696. "configure.in". To do this, use autoconf 2.10.
  697.  
  698. Once your Makefile is generated (if needed), you can modify the file
  699. "config.h" to suit your needs. You can also modify "src/od-amiga/ami-win.c"
  700. to allow the support of cybergfx modes (you'll need to obtain
  701. CGraphX-DevKit.lha from Aminet then). I suggest you to define
  702. DONT_WANT_SOUND in "config.h". That will speed up the emulation (sound
  703. emulation slows down the speed by roughly 10%). 
  704.  
  705. When you'll have configured uae correctly, type "make" in a shell. Then
  706. one hour and a half later you'll get the uae executable (it might be less
  707. if you have a *real fast* Amiga, but don't expect less that 15 minutes).
  708. I know it's slow, but Amigas are slow (even those with 68060 are not that
  709. fast, by today's standards ;-).  
  710.  
  711. To compile, 10Mb of free memory should be enough (I succeded with 4Mb, but
  712. virtual memory helps in that case). The resulting directory size is
  713. roughtly 5.7Mb on my harddrive. Be sure to have a stack of at least
  714. 300Kb when compiling UAE and at least 32kb when UAE is running.
  715.  
  716. NOTE: I had reports that gcc complains and fail to compile cpu_f?.s.
  717. This is caused by a problem with perl and src/md-68k/cpuopti. I don't
  718. know where it comes from precisely as I never experienced that problem.
  719. Anyway, to avoid this, you should uncomment the lines in the beginning of
  720. src/md-68k/cpuopti. Unfortunately, UAE will run slower as the asm files
  721. won't have an extra optimisation pass.
  722.  
  723.  
  724. 10. COMPILING UAE WITH SAS/C
  725. ============================
  726. This section is rather for programmers that want to build their own
  727. versions of UAE using SAS/C. You should be familiar with unix word and
  728. SAS/C if you intend to do so. 
  729.  
  730. To compile UAE with SAS/C you'll need SAS/C V6.58 and a subset of GG (see
  731. the previous section). That subset must include ixemul, sh, make and perl
  732. to do the compilation and at least sh-utils, cpp, perl, sed, autoconf to
  733. run the configure script. Probably a few other package are needed, so if
  734. you want to be on the safe side, you had rather had GG completely
  735. installed. On my machine, the subpart of GG I use (gcc, g++, man, curses,
  736. termcap, ...) takes only 14Mb on an XFH partition.. that's not much, but
  737. I've spent time to replace duplicates with symbolic links.
  738.  
  739. Once you have GG properly installed, you must copy the file
  740. "src/od-amiga/scc" to somewhere in your path (sc:c for example). You can
  741. also do something like:
  742.                       CLI> assign c: src/od-amiga add
  743. or any other solution. The purpouse is to enable GG's tools to find scc.
  744. The file scc is a perl script that tries to emulate gcc behaviour using
  745. SAS/C. [note to amiga-developpers: that script is tuned for UAE, but I
  746. think it can be modified for other projects, let me know about it if you
  747. intend enhance it]. Then, do:
  748.                       CLI> setenv CC scc
  749. to tell the configure script to use scc as the C compiler. Next, run the
  750. configure script:
  751.                       CLI> sh -c configure --enable-sound
  752. The configure script will probably produce warnings, but they are not
  753. important. Then, check src/Makefile to see if it fills your needs (you'll
  754. probably have to replace -g with -O3 to have an optimised version of UAE,
  755. and modify -m<cputype> with -m68060 if you have a 68060 cpu). Now, as the
  756. last operation, type in
  757.                       CLI> make
  758. to build UAE and be patient! (it takes a while with optimisations enabled).
  759.  
  760. Last note about SAS/C: Compiling UAE with SAS/C instead of gcc will
  761. disable some nice features of UAE (native filesystems mounting,
  762. average time per frame computation, ...) because SAS/C is not enough
  763. POSIX compliant.
  764.  
  765.  
  766.  
  767. 11. REMARKS OR BUG-REPORTS
  768. ==========================
  769.  
  770. You can send me your remarks and bug-report to:
  771.  
  772.                        devulder@info.unicaen.fr
  773.  
  774.  
  775. 12. LAST NOTE
  776. =============
  777.  
  778. Why emulate an Amiga on an Amiga ? That can seem to be a foolish
  779. behaviour.. Actually it is not !
  780.  
  781. Many old games/demos refuse to work well if you are using a 68030+;
  782. even with degrader running (ever tried to make ST4Amiga work on
  783. anything greater than a 68000?). In that case, uae might be usefull.
  784.  
  785. UAE might also help graphic-board owners. With UAE, they can view all
  786. the demos with copper and blitter effects that fails to run on their
  787. graphics board. Or run programs like Deluxe-Paint or Brilliance that
  788. poke the hardware directly. That is specialy usefull for DRACO owners.
  789.  
  790. Using uae on a 68040+ Amiga will let you play games or demos on your
  791. workbench, in a perfect multitasking. And that is, believe me, quite
  792. amazing (even on my poor 68030 :-). Alternatively, UAE makes a 
  793. wonderfull screen-saver (a bit memory-hungry though).
  794.  
  795. The main advantage of uae, will be when PowerPC Amigas will come out.
  796. On these machines, I bet no old programs will run. Those machines will
  797. certainly include a 680x0 emulation powerfull enough to run DOS 
  798. programs, but certainly not sufficient to run old games. Thanks to UAE,
  799. backward compatibility will not be a problem anymore. UAE is definitely 
  800. a great program ! 
  801.